/*
	UnitConverter.h
	Christopher Raffaele
	04.28.2008

	UnitConverter's class definitions
*/
#include"UnitConverterDec.h" //UnitConverter class declarations

//print the main menu
void UnitConverter::showMainMenu(){
	std::cout << "\n--------------------------------\n"
		 << "\\         Unit Converter        \\\n"
		 << " ---------------------------------\n"
		 << " | 1 | Distance                  |\n"
		 << " ---------------------------------\n"
		 << " | 2 | Temperature               |\n"
		 << " ---------------------------------\n"
		 << " | 3 | Time                      |\n"
		 << " ---------------------------------\n";
}

//prompt for choice
void UnitConverter::start(){
	showMainMenu(); //show menu
	std::cout << "\nWhat would you like to convert (0 to end)? ";
	
	int temp; //choice variable

	std::cin >> temp;

	//determine which converter to run as well as validate input
	switch (temp){
		case 0:
			again = 0; //stop from running the prompt again
			break;
		case 1:
			distanceConverter.start(); //start distance converter
			break;
		case 2:
			tempConverter.start(); //start temperature converter
			break;
		case 3:
			timeConverter.start(); //start time converter
			break;
		default: //any other number entered
			std::cout << "Invalid Selection\n\n"; 
			system("pause"); //wait
	}	
}